//
//  PBMyListCell.m
//  PBHomeDemo
//
//  Created by Playboy on 2017/12/20.
//  Copyright © 2017年 tmkj. All rights reserved.
//

#import "PBMyListCell.h"

@interface PBMyListCell ()
@property (weak, nonatomic) IBOutlet UILabel *mainLabel;
@property (strong, nonatomic) IBOutlet UILabel *desLabel;

@end

@implementation PBMyListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)refreshWithIndexPath:(NSIndexPath *)indexPath {
    self.desLabel.text = @"";
    if (indexPath.row == 1) {
        self.mainLabel.text = @"我的预约";
    }else if (indexPath.row == 2) {
        self.mainLabel.text = @"我的订单";
    }else if (indexPath.row == 3) {
        self.mainLabel.text = @"优惠券";
    }else if (indexPath.row == 4) {
        self.mainLabel.text = @"我的合同";
    }
}

- (void)refreshMyInfoWithModel:(PBMyInfoModel *)model indexPath:(NSIndexPath *)indexPath{
    if (indexPath.section == 0) {
        self.mainLabel.text = @"昵称";
        self.desLabel.text = model.nickname;
        self.desLabel.textColor = [UIColor tm_LabelTextColor];
    }else if (indexPath.section == 1) {
        self.mainLabel.text = @"实名认证";
        self.desLabel.textColor = [UIColor tm_mainOrignColor];
        if (model.identityState == 0) {
            self.desLabel.text = @"";
        }else if (model.identityState == 1) {
            self.desLabel.text = @"审核中";
        }else if (model.identityState == 2) {
            self.desLabel.text = @"已认证";
        }else if (model.identityState == 3) {
            self.desLabel.text = @"审核失败";
        }
    }else if (indexPath.section == 2) {
        self.desLabel.text = @"";
        if (indexPath.row == 0) {
            self.mainLabel.text = @"关于我们";
        }else if (indexPath.row == 1) {
            self.mainLabel.text = @"投诉建议";
        }
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
